<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
var timesRun = 0;
var interval;
$(function() {
	interval =setInterval("queryWeChatStatus()", 5000); 
});
function queryWeChatStatus() {
	timesRun += 1;
	if(timesRun === 10){
		clearInterval(interval);
	}
	$.ajax({
        url: "${base}/order/payCallByWeiXin.jspx?orderNumber=${orderNumber!}",
        type: "POST",
        dataType:"json",
        data: "",
        success: function (data) {
            if (data.status==0||data.status==4) { //订单状态为0表示支付成功
               alert("支付成功");
               window.location.href = "${content.url!}"; 
            }else if(data.status==1){
            	alert("微信扫码支付密钥错误，请通知管理员");
            }else if(data.status==2){
            	alert(data.error);
            }else if(data.status==3){
            	alert("支付参数错误，请重新支付!");
            }
        }
    });
} 
</script>
</head>
<body>
 <img src="${base}/special/o_create_dimensioncode.jspx?content=${code_url!}&size=90" style="width:150px;height:150px;"/>
</body>
</html>